<!DOCTYPE html>
<html lang="en" style="font-size: 20px;">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        .outer{
            width: 400px;
            height: 400px;
            font-size: 20px;
            background: #aef;
        }

        .inner{
            width: 10rem;
            height: 10rem;
            background: #265;
        }
</style>
</head>
<body>
    <!-- 
        em: 相对单位    
        rem: 相对单位   根标签的 font-size 值
     -->
     <div class="outer">
        <div class="inner"></div>
     </div>
</body>
</html>